package com.sk.imitationnetease.features.main

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.airbnb.lottie.compose.*
import com.sk.imitationnetease.R
import com.sk.imitationnetease.base.BaseView

class MainView() : BaseView() {
    @Preview
    @Composable
    override fun Content() {

        Column(
            modifier = Modifier.background(Color.Red)
                .padding(16.dp)) {
//                Text(
//                text = "Hello!",
//                style = MaterialTheme.typography.h5,
//                color = Color.Red,
//                modifier = Modifier
//                    .padding(bottom = 8.dp)
//                    .clickable {
//                        (viewInterface as MainActivity).showToast("111")
//                    }
//            )
            val composition by rememberLottieComposition(LottieCompositionSpec
                    .Asset("circleUserHint/data.json"))
            LottieAnimation(
                composition,
                iterations = LottieConstants.IterateForever,
                modifier = Modifier
                    .size(100.dp)
            )
        }
    }

}